﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FutureOpen.Web.Pages;
using FutureOpen.Core;
using FutureOpen.Core.func;
using FutureOpen.Core.func.db;
using System.Text;

public partial class OrgUsr : PageBase
{
    public int oid;
    MyOrg myorg = new MyOrg();
    protected void Page_Load(object sender, EventArgs e)
    {
        base.PageInit();
        oid = orgid;
        if (!IsPostBack)
        {              
            if (orgid > 0)
            {                      
                AspNetPager1.RecordCount = myorg.GetUsrCountByOrgID(orgid);
                BindUsrs(0, 20);
            }
            
        }

    }
    private void BindUsrs(int start, int count)
    {                
        System.Collections.Generic.IList<Orgusr> artList = myorg.GetOrgUsrs(this.oid, start, count);

        this.dlUsrs.DataSource = artList;
        this.dlUsrs.DataBind();
    }

    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
        BindUsrs(25 * (e.NewPageIndex - 1), 20);
    }
    
    
}
